//
//  AddressBookCell.m
//  Marketing
//
//  Created by HanenDev on 16/3/3.
//  Copyright © 2016年 Hanen 3G 01. All rights reserved.
//

#import "AddressBookCell.h"

#define STARTX [UIView getWidth:10]
#define CELLHEIGHT 50

@implementation AddressBookCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        CGFloat cellY = 10;
        
        
        _headerImage = [[UIImageView alloc]initWithFrame:CGRectMake(STARTX, cellY - 5, 40, 40)];
        _headerImage.layer.cornerRadius = 40/2;
        _headerImage.layer.masksToBounds =YES;
        [self.contentView addSubview:_headerImage];
        
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(_headerImage.maxX + 10, cellY, 200, 30)];
        _nameLabel.textColor = blackFontColor;
        [ViewTool setLableFont14:_nameLabel];
        [self.contentView addSubview:_nameLabel];
        
        UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(KSCreenW - STARTX -25 , cellY +5, 20, 20)];
        img.image = [UIImage imageNamed:@"HY_login_icon_phone"];
        [self.contentView addSubview:img];
        
        _phoneBtn = [[UIButton alloc]initWithFrame:CGRectMake(KSCreenW - 70 , 0, 70, 50)];
//        _phoneBtn.backgroundColor = [UIColor redColor];
//        [_phoneBtn setImage:[UIImage imageNamed:@"HY_login_icon_phone"] forState:UIControlStateNormal];
        _phoneBtn.userInteractionEnabled = YES;
        [self.contentView addSubview:_phoneBtn];
        
//        _lineView =[[UIView alloc]initWithFrame:CGRectMake(_nameLabel.x, CELLHEIGHT - 1, KSCreenW, 1)];
        _lineView = [[UIView alloc]init];
        _lineView.backgroundColor = grayLineColor;
        [self.contentView addSubview:_lineView];
        
    }
    return self;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
